<?php /* Smarty version 2.6.26, created on 2014-02-24 22:26:24
         compiled from admin/order/update.html */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="view/admin/style/basic.css" />
<link rel="stylesheet" type="text/css" href="view/admin/style/order.css" />
<script type="text/javascript" src="view/admin/js/order.js"></script>
<title>Insert title here</title>
</head>
<body>
    <h2><a href="?a=order">返回订单列表</a>订单 -- 修改订单</h2>
    <div id="list">
        <table cellspacing="1">
            <caption>订单信息</caption>
            <tr><th>订单编号</th><th>下单时间</th></tr>
            <tr><td><?php echo $this->_tpl_vars['oneOrder'][0]->ordernum; ?>
</td><td><?php echo $this->_tpl_vars['oneOrder'][0]->date; ?>
</td></tr>
        </table>
        <br /> 
        <table cellspacing="1">
            <caption>商品状态</caption>
            <tr><th>编号</th><th>名称</th><th>属性</th><th>售价</th><th>数量</th><th>小计</th></tr>
            <?php $_from = $this->_tpl_vars['oneOrder'][0]->goods; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
            <tr><td><?php echo $this->_tpl_vars['value']['sn']; ?>
</td><td><?php echo $this->_tpl_vars['value']['name']; ?>
</td><td>
            <?php $_from = $this->_tpl_vars['value']['attr']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
?>
                <?php echo $this->_tpl_vars['k']; ?>
:
                <?php $_from = $this->_tpl_vars['v']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k2'] => $this->_tpl_vars['v2']):
?>
                <?php echo $this->_tpl_vars['v2']; ?>
;
                <?php endforeach; endif; unset($_from); ?> 
            <?php endforeach; endif; unset($_from); ?>
            </td><td><?php echo $this->_tpl_vars['value']['price_sale']; ?>
</td><td><?php echo $this->_tpl_vars['value']['num']; ?>
</td><td style="color:red"><?php echo $this->_tpl_vars['value']['total_small']; ?>
元</td></tr>
            <?php endforeach; endif; unset($_from); ?>
        </table>
        <br /> 
        <table cellspacing="1">
            <caption>收货人信息</caption>
            <tr><th>用户名</th><th>收货人</th><th>电子邮件</th></tr>
            <tr><td><?php echo $this->_tpl_vars['oneOrder'][0]->user; ?>
</td><td><?php echo $this->_tpl_vars['oneOrder'][0]->name; ?>
</td><td><?php echo $this->_tpl_vars['oneOrder'][0]->email; ?>
</td></tr>
        </table>
        <br /> 
        <table cellspacing="1">
            <caption>支付信息</caption>
            <tr><th>物流方式</th><th>支付方式</th><th>总金额</th></tr>
            <tr><td><?php echo $this->_tpl_vars['oneOrder'][0]->delivery; ?>
</td><td><?php echo $this->_tpl_vars['oneOrder'][0]->pay; ?>
</td><td style="color:red;"><?php echo $this->_tpl_vars['oneOrder'][0]->price; ?>
元</td></tr>
        </table>
        <br />    
        <table cellspacing="1">
            <caption>备注信息</caption>
            <tr><th>备注信息</th><th>缺货处理</th></tr>
            <tr><td><?php echo $this->_tpl_vars['oneOrder'][0]->text; ?>
</td><td><?php echo $this->_tpl_vars['oneOrder'][0]->ps; ?>
</td></tr>
        </table>
        <br /> 
        <table cellspacing="1">
            <caption>送货信息</caption>
            <tr><th>邮政编码</th><th>联系电话</th><th>标志性建筑</th><th>收货地址</th></tr>
            <tr><td><?php echo $this->_tpl_vars['oneOrder'][0]->zipcode; ?>
</td><td><?php echo $this->_tpl_vars['oneOrder'][0]->phone; ?>
</td><td><?php echo $this->_tpl_vars['oneOrder'][0]->building; ?>
</td><td><?php echo $this->_tpl_vars['oneOrder'][0]->address; ?>
</td></tr>
        </table>
    </div>
    <form method="post" name="update" action="?a=order&m=update&id=<?php echo $this->_tpl_vars['oneOrder'][0]->id; ?>
">
        <dl class="form">
            <input type="hidden" name="user" value="<?php echo $this->_tpl_vars['oneOrder'][0]->user; ?>
" />
            <?php if ($this->_tpl_vars['oneOrder'][0]->order_state == '已取消'): ?>
            <dd>订单状态：<span class="red">已取消，订单失效，可以选择<a href="?a=order&m=delete&id=<?php echo $_GET['id']; ?>
">[删除]</a>!</dd>
            <?php else: ?>
                <?php if ($this->_tpl_vars['oneOrder'][0]->refund == 1): ?>
                <dd style="color:red;">此订单正在处于退款状态，请检查是否符合退款条件，然后点击下面按钮退款!</dd>
                <input type="hidden" name="refund" value="2" />
                <dd class="submit"><input type="submit" name="send" value="确定退款"/><span style="color:red">(确定后，库存将会恢复，该订单也将暂时处于失效状态!)</span></dd>
                <?php else: ?>
                    <?php if ($this->_tpl_vars['oneOrder'][0]->refund == 2): ?>
                        <dd style="color:red;">此订单正在处于暂时失效状态，用户可重新下单，如果用户在24小时内不重新下单，则订单将会转为已取消状态!</dd>
                    <?php else: ?>
            <dd>订单状态：
                <?php if ($this->_tpl_vars['oneOrder'][0]->order_state != '已确认'): ?><input type="radio" name="order_state" <?php if ($this->_tpl_vars['oneOrder'][0]->order_state == '未确认'): ?> checked="checked"<?php endif; ?> value="未确认"/>未确认<?php endif; ?>
                <input type="radio" name="order_state" <?php if ($this->_tpl_vars['oneOrder'][0]->order_state == '已确认'): ?> checked="checked"<?php endif; ?> value="已确认"/>已确认
                <input type="radio" name="order_state" <?php if ($this->_tpl_vars['oneOrder'][0]->order_state == '已取消'): ?> checked="checked"<?php endif; ?> value="已取消"/>已取消
            </dd>
            <dd>支付状态：
                <?php if ($this->_tpl_vars['oneOrder'][0]->order_pay != '已付款'): ?><input type="radio" name="order_pay" <?php if ($this->_tpl_vars['oneOrder'][0]->order_pay == '未付款'): ?> checked="checked"<?php endif; ?> value="未付款"/>未付款<?php endif; ?>
                <input type="radio" name="order_pay" <?php if ($this->_tpl_vars['oneOrder'][0]->order_pay == '已付款'): ?> checked="checked"<?php endif; ?> value="已付款"/>已付款
            </dd>
            <dd>配送状态：
                <?php if ($this->_tpl_vars['oneOrder'][0]->order_delivery != '已发货'): ?>
                <input type="radio" name="order_delivery" <?php if ($this->_tpl_vars['oneOrder'][0]->order_delivery == '未发货'): ?> checked="checked"<?php endif; ?> value="未发货"/>未发货
                <input type="radio" name="order_delivery" <?php if ($this->_tpl_vars['oneOrder'][0]->order_delivery == '已配货'): ?> checked="checked"<?php endif; ?> value="已配货"/>已配货
                <?php endif; ?>
                <input type="radio" name="order_delivery" <?php if ($this->_tpl_vars['oneOrder'][0]->order_delivery == '已发货'): ?> checked="checked"<?php endif; ?> value="已发货"/>已发货
            </dd>
            <dd style="display:none;" class="delivery">物流公司：
                <select onchange="changDelivery();" id="d" name="delivery_name">
                    <option> -- 请选择一个物流公司 -- </option>
                    <?php $_from = $this->_tpl_vars['allDelivery']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                    <?php if ($this->_tpl_vars['oneOrder'][0]->delivery_name == $this->_tpl_vars['value']->name): ?>
                    <option url="<?php echo $this->_tpl_vars['value']->url; ?>
" value="<?php echo $this->_tpl_vars['value']->name; ?>
" selected="selected"><?php echo $this->_tpl_vars['value']->name; ?>
</option>
                    <?php else: ?>
                    <option url="<?php echo $this->_tpl_vars['value']->url; ?>
" value="<?php echo $this->_tpl_vars['value']->name; ?>
"><?php echo $this->_tpl_vars['value']->name; ?>
</option>
                    <?php endif; ?>
                    <?php endforeach; endif; unset($_from); ?>
                </select> <input type="hidden" name="delivery_url" value="<?php echo $this->_tpl_vars['oneOrder'][0]->delivery_url; ?>
" />
            </dd>
            <dd style="display:none;" class="delivery">运 单 号： <input type="text" name="delivery_number" value="<?php echo $this->_tpl_vars['oneOrder'][0]->delivery_number; ?>
" class="text"/></dd>
            <dd class="submit"><input type="submit" name="send" value="修改订单"/></dd>
                    <?php endif; ?>
                <?php endif; ?>
            <?php endif; ?>
        </dl>
    </form>
</body>
</html>